﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using PMPUtils.Form;
using PMPUtils.Resources;

namespace PMP.Maintenance
{
    public partial class Dashboard : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            FormUtil.Authenticate(Session, Response);
        }

        protected void btnSprintMaint_Click(object sender, EventArgs e)
        {
            PopupForm SprintMaint = new PopupForm(Response, "SprintMaintenance.aspx", "SprintMaint", "1100", "700", "50", "100");
            SprintMaint.Popup();

            Close();
        }

        protected void btnProgressMaint_Click(object sender, EventArgs e)
        {
            PopupForm ProgressMaintenance = new PopupForm(Response, "ProgressMaintenance.aspx", "ProgressMaintenance", "1100", "500", "50", "100");
            ProgressMaintenance.Popup();

            Close();
        }

        protected void btnPriorityMaint_Click(object sender, EventArgs e)
        {
            PopupForm PriorityMaintenance = new PopupForm(Response, "PriorityMaintenance.aspx", "PriorityMaintenance", "1100", "500", "50", "100");
            PriorityMaintenance.Popup();

            Close();
        }

        protected void btnUserMaint_Click(object sender, EventArgs e)
        {
            PopupForm UserMaintenance = new PopupForm(Response, "UserMaintenance.aspx", "UserMaintenance", "1100", "500", "50", "100");
            UserMaintenance.Popup();

            Close();
        }

        protected void btnClose_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void Close()
        {
            PopupForm thisForm = new PopupForm(Response);
            thisForm.Close();
        }

        protected void btnChecklistMaint_Click(object sender, EventArgs e)
        {
            PopupForm UserMaintenance = new PopupForm(Response, "ChecklistMaintenance.aspx", "ChecklistMaintenance", "1250", "800", "10", "50");
            UserMaintenance.Popup();

            Close();
        }
    }
}
